package com.atguigu.srb.core.controller;


import com.atguigu.common.result.R;
import com.atguigu.srb.core.pojo.entity.IntegralGrade;
import com.atguigu.srb.core.service.IntegralGradeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 积分等级表 前端控制器
 * </p>
 *
 * @author TieZhu
 * @since 2021-06-10
 */
@Api(tags = "积分等级管理")
@CrossOrigin
@RestController
@RequestMapping("/web/core/integralGrade")
public class IntegralGradeController {
    @Resource
    private IntegralGradeService integralGradeService;

    @GetMapping("/list")
    @ApiOperation(value = "查询积分表的数据列表")
    public R gradeList(){
        List<IntegralGrade> integralGrades = integralGradeService.list();
        return R.ok().data("gradeList",integralGrades);
    }
}